#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int n;
    cin>>n;
    string A,B;
    cin>>A>>B;
    string C = A;
    reverse(C.begin(),C.end());
    if(B==C)
    {
       cout<< A <<" and "<<B <<" are reverse.";
    }
    else
    {
        cout<<A<<" and "<<B << " are not reverse.";
    }
}
